var _serviceURL = '/69mark/web';// 必须设置
$(function() {
	doPage(1);
});

function doPage(page){
	var userName = $("#userName").val();
	var userRole = $("#userRole option:selected").attr("value");
	var time = $("#mydatepicker").val();
	$.ajax({
   		type : "POST",
   		url : _serviceURL+"/toListAllCash.do",
   		cache : false,
   		data : "pageNo="+page+"&pageSize=10&userName="+userName+"&userRole="+userRole+"&time="+time,
   		dataType : 'json',
   		success : function(data) {
   			var result = "";
   			for(var i=0;i<data.menuList.length;i++){
   				result += "<tr>";
   				result += "<td>"+data.menuList[i].user_name+"</td>";
   				if (data.menuList[i].user_role ==0) {
   					result += "<td>boss</td>";
   				}else {
   					result += "<td>秘书</td>";
   				}
   				
   				result += "<td>"+data.menuList[i].account_balance+"</td>";
   				result += "<td>"+data.menuList[i].cash_balance+"</td>";
   				result += "<td>"+data.menuList[i].time+"</td>";
   				
   				if (data.menuList[i].state ==0) {
   					result += "<td>未完成</td>";
   				}else {
   					result += "<td>已完成</td>";
   				}
   				
   				if (data.menuList[i].type ==0) {
   					result += "<td>充值</td>";
   				}else {
   					result += "<td>提现</td>";
   				}
   				
   				result += "</tr>";
   			}
   			
   			$("#listUser").html(result);
   			$("#page_user").html(data.navi);
   			
   			$("#userName").val("");
   			$("#userRole").val("");
   			$("#time").val("");
   		}
	})
	
}

//身高搜索
function serchName(){
	doPage(1);
}
